home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
DDJMAG
/
DDJ9207.ZIP
/
STRUCPRG.ASC
< prev
next >
Wrap
Text File
|
1992-06-15
|
680b
|
30 lines
_STRUCTURED PROGRAMMING COLUMN_
by Jeff Duntemann
[Example 1: The stream registration record definition]
TStreamRec = RECORD
ObjType : Word; { You define a unique code for this field }
VMTLink : Word; { The offset of the type's VMT in the dataseg }
Load : Pointer; { The full address of the type's Load method }
Store : Pointer { The full address of the type's Store method }
END;
[Example 2: The registration record for TMortgage]
CONST
RMortgage : TStreamRec =
(ObjType : 1200;
VMTLink : Ofs(TypeOf(TMortgage)^);
Load : @TMortgage.Load;
Store : @TMortgage.Store);